package nc.ui.fp.plandetail;

import java.awt.Container;

import javax.swing.event.TableModelEvent;

import nc.bs.framework.common.NCLocator;
import nc.itf.uap.rbac.IUserManageQuery;
import nc.ui.pub.ClientEnvironment;
import nc.ui.pub.beans.UIPanel;
import nc.ui.trade.query.HYQueryDLG;
import nc.vo.bd.b06.PsndocVO;
import nc.vo.pub.BusinessException;

public class ClientQueryDLG extends HYQueryDLG {


	public ClientQueryDLG(Container parent, UIPanel normalPnl, String pk_corp,
			String moduleCode, String operator, String busiType, String nodeKey) {
		super(parent, normalPnl, pk_corp, moduleCode, operator, busiType, nodeKey);
		// TODO Auto-generated constructor stub4
//		init();
	}
	protected void init(){
		IUserManageQuery uq = NCLocator.getInstance().lookup(IUserManageQuery.class);
		String pk_corp = ClientEnvironment.getInstance().getCorporation().getPrimaryKey();
		String operatorid = ClientEnvironment.getInstance().getUser().getPrimaryKey();
		PsndocVO mandoc;
		try {
			mandoc = uq.getPsndocByUserid(pk_corp, operatorid);
			if(mandoc != null){
				setDefaultValue("fp_plandetail_h.pk_deptdoc",  mandoc.getPk_deptdoc(),  mandoc.getPk_deptdoc());
			}
		} catch (BusinessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

}
